# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=lft
pkgver=3.91
pkgrel=1
epoch=1
groups=('blackarch' 'blackarch-recon' 'blackarch-networking')
pkgdesc='A layer four traceroute implementing numerous other features.'
arch=('x86_64' 'aarch64')
license=('custom:unknown')
url='http://pwhois.org/lft/'
depends=('libpcap')
source=("http://pwhois.org/get/$pkgname-$pkgver.tar.gz")
sha512sums=('1d030e2def14330426eef4c81245c4cce5f09c560b65b319199b20d82e967b77a5d4e323e2e64a8c1bcf80d1f87ae871e3f24a7d9cbc19cd7a5be2d3204845e7')

build() {
  cd "$pkgname-$pkgver"

  if [[ "$CARCH" == "x86_64" ]];
  then
    ./configure --prefix=/usr
  else
    ./configure --prefix=/usr --build=arm
  fi

  make
}

package() {
  cd "$pkgname-$pkgver"

  make prefix="$pkgdir/usr" install

  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

